//设置--配送设置
import React from "react";
import "./css/set-delivery.css";
import PageTitle from "../../component/set/PageTitle";
import IconFont from "../../component/logo";
import SetButton from '../../component/set/SetBtton'
import SetMenuTable from '../../component/set/SetMenuTable'
import {Switch} from 'antd'

class SetDelivery extends React.Component {
    constructor() {
        super()
        this.state={
            pagination:false,
            data:[
                {
                    key:1,
                    name:'门店自提',
                    value:'pickUp',
                    isUse:true
                },
                {
                    key:2,
                    name:'快递配送',
                    value:'express',
                    isUse:true
                },
                {
                    key:3,
                    name:'EMS国内快递',
                    value:'EMS',
                    isUse:false
                },
            ],
            columns:[
                {
                    title:'ID',
                    dataIndex:'key',
                    key:'key'
                },
                {
                    title:'名称',
                    dataIndex:'name',
                    key:'name'
                },
                {
                    title:'值',
                    dataIndex:'value',
                    key:'value'
                },
                {
                    title:'启用',
                    dataIndex:'isUse',
                    key:'isUse',
                    render:(isUse)=><Switch checked={isUse}></Switch>
                },
                {
                    title:'操作',
                    render:()=><SetButton txt='修改'></SetButton>
                },
            ]
        }
    }
  render() {
    return (
      <div className="set_delivery">
        <PageTitle
          title="配送设置"
          icon={<IconFont type="icon-peisongfangshiicon"></IconFont>}
            btn={<SetButton txt='添加'></SetButton>}
        ></PageTitle>
        <SetMenuTable {...this.state}></SetMenuTable>
      </div>
    );
  }
}

export default SetDelivery;
